// 单页相关的mock数据
import { mock, Random } from 'mockjs'

// 获取单页详情
export const getPageDetail = mock({
  'code': 1,
  'msg': '操作成功',
  'data': {
    'pageInfo': {
      'id': '@id',
      'title': '@ctitle(5, 20)',
      'flag': '@pick(["hot", "new", "recommend"])',
      'image': '@image("200x150", "#4A7BF7", "Page")',
      'banner': '@image("750x300", "#4A7BF7", "Banner")',
      'diyname': '@word(5, 10)',
      'description': '@cparagraph(1, 3)',
      'content': '<p>@cparagraph(10, 20)</p><p>@cparagraph(10, 20)</p><p>@cparagraph(10, 20)</p>',
      'views': '@integer(100, 10000)',
      'comments': '@integer(0, 500)',
      'createtime': '@integer(1600000000, 1630000000)',
      'updatetime': '@integer(1600000000, 1630000000)',
      'status': 'normal',
      'iscomment': '@boolean'
    },
    'commentList|5': [{
      'id': '@id',
      'user_id': '@integer(1, 100)',
      'user': {
        'id': '@integer(1, 100)',
        'nickname': '@cname',
        'avatar': '@image("100x100", "#4A7BF7", "Avatar")'
      },
      'content': '@cparagraph(1, 3)',
      'create_date': '@date("yyyy-MM-dd")',
      'createtime': '@integer(1600000000, 1630000000)'
    }]
  }
})